package com.jycode.commons.genericdaoDeprecated;

import java.io.Serializable;

/**
 * GenericDao是泛型DAO的第一个版本
 * 其缺点是必须手工在Spring配置文件中声明每一个DAO类, 优点是不必为每个DAO类书写实现代码, 只需声明为接口并写出查询的函数原型.
 *
 * The basic GenericDao interface with CRUD methods.
 *
 * Finders are added with interface inheritance and AOP introductions for concrete implementations
 *
 * Extended interfaces may declare methods starting with findBy... listBy/iterateBy... or scrollBy...
 * They will execute a preconfigured query that is looked up based on the rest of the method name
 *
 * 标量查询扩展: do...
 *
 * StoreProc名称查找算法扩展，在查找NamedQuery失败的时候透明自动地查找等价的StoreProc名称。但存储过程不会支持分页查询，筛选等Hibernate高级特征。
 *
 *
 * @author "banlyst <banlyst@gmail.com>"
 * @deprecated
 */
public interface GenericDao<T, PK extends Serializable>
{

    PK create(T newInstance);

    T read(PK id);

    void update(T transientObject);

    void delete(T persistentObject);
}
